package com.changan.entity;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
//获取多条数据
@ConfigurationProperties(prefix = "student")
public class Student {

    private String name;

    private Integer age;

    private Boolean sex;

    private Date birth;

    private Map<String,Object> address;

    /**
     * 爱好
     */
    private List<Object> hobbies;

    /**
     * 老师
     */
    private Teacher teacher;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Boolean getSex() {
        return sex;
    }

    public void setSex(Boolean sex) {
        this.sex = sex;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public Map<String, Object> getAddress() {
        return address;
    }

    public void setAddress(Map<String, Object> address) {
        this.address = address;
    }

    public List<Object> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<Object> hobbies) {
        this.hobbies = hobbies;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", birth=" + birth +
                ", address=" + address +
                ", hobbies=" + hobbies +
                ", teacher=" + teacher +
                '}';
    }
}
